#include <stdio.h>
#include <string.h>

extern char *gets (char *__s) __wur __attribute_deprecated__;
char const whitespace[] = " \n\r\f\t\v";

int main(int argc, char* argv[]) {
    char buffer[101];
    int count=0;

    while(gets(buffer)){
        char *word;
        for(word = strtok(buffer, whitespace);word != NULL;word = strtok(NULL, whitespace)) {
            if(strcmp(word,"the")==0){
                count+=1;
            }
        }
    }
    printf("%d\n",count);
    return 0;
}